//
//  CommitListCell.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/9/1.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "CommitListCell.h"
#import <UIImageView+WebCache.h>

@interface CommitListCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
@property (weak, nonatomic) IBOutlet UILabel *commentLab;


@end
@implementation CommitListCell

- (float)getCellHight:(CommentModel *)model
{
    self.model = model;
    [self layoutIfNeeded];
    float height = CGRectGetMaxY(self.commentLab.frame)+10;
    return height;
}

- (void)setModel:(CommentModel *)model
{
    _model = model;
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.portraitUrl] placeholderImage:GetImage(@"person_avatar")];
    self.nameLab.text = model.userName;
    self.timeLab.text = model.formatCreateDate;
    self.commentLab.text = model.content;
}

@end
